www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModelComponentLabel\D_chk_edit_custom_asp_label.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>



<htmL>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />


<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->


<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->

<!--#include file=../../inc/ND_class_function.asp-->

<!--#include file=conn_m.asp-->



<%
AJAXshowLoader()

%>

<%


if find_dataw("qitashezhi123","0",7)<>"1" and qx_if_max=0 then
response.redirect "../D_suodinguser.asp"
end if

%>


<%
session("newdsoft_selct_a_lable_bef_haved")=""





'==========================================================
ztypee=request("labeltype")

if ztypee<>"" then

fph=left(request("fname"),len(request("fname"))-1)

fph2=split(fph,"/")
muluzz=""
for ii2=0 to ubound(fph2)-1
muluzz=muluzz&fph2(ii2)&"/"
next


sss1=loadfile("../../Model/ComponentLabels/"&muluzz&"index_componentlabel.asp")
	
if instr(1,sss1,"$componentlabelname:",1)<>0 then
nd1_m_label_name=trim(mid(sss1,instr(1,sss1,"$componentlabelname:",1)+20,instr(1,sss1,"$end_componentlabelname",1)-(instr(1,sss1,"$componentlabelname:",1)+20)))
else
nd1_m_label_name=""
end if

if instr(1,sss1,"$componentlabelcixu:",1)<>0 then
nd1_m_label_cixu=trim(mid(sss1,instr(1,sss1,"$componentlabelcixu:",1)+20,instr(1,sss1,"$end_componentlabelcixu",1)-(instr(1,sss1,"$componentlabelcixu:",1)+20)))
else
nd1_m_label_cixu=""
end if
if instr(1,sss1,"$is_sys_componentlabel:",1)<>0 then
nd1_m_label_is_sys=trim(mid(sss1,instr(1,sss1,"$is_sys_componentlabel:",1)+23,instr(1,sss1,"$end_is_sys_componentlabel",1)-(instr(1,sss1,"$is_sys_componentlabel:",1)+23)))
else
nd1_m_label_is_sys=""
end if

if ztypee="addmode" then
hzzza="addmode"
filezza="addmode_label.asp"
end if
if ztypee="editmode" then
hzzza="editmode"
filezza="editmode_label.asp"
end if
if ztypee="showmode" then
hzzza="showmode"
filezza="showmode_label.asp"
end if
if ztypee="do_add_mode" then
hzzza="doaddmode"
filezza="do_add_mode_label.asp"
end if
if ztypee="do_edit_mode" then
hzzza="doeditmode"
filezza="do_edit_mode_label.asp"
end if

end if



if ztypee<>"" then

bname1="$"&hzzza&"$-ComponentLabel-$"

else

bname=request("bnm")

bname1=bname



end if


if nd1_m_label_is_sys="1" then
%>



<script language=javascript>

alert("系统控件无法被修改(因为其标签参数被系统所调用),修改失败! ,你可以尝试把系统控件复制为控件副本,再编辑此控件副本");

history.go(-1);

</script>


<%

'========================================================



else








ss4=request("fname")
ss4=left(ss4,len(ss4)-1) '去掉最后一个/号


strDBPath1= left(ss4,instrrev(ss4,"/"))


sssssss1=""
for i=1 to len(ss4)

if mid(ss4,len(ss4)-i+1,1)="/" then

sssssss1=i
exit for
end if
next


if sssssss1<>"" then
sssssss1=right(ss4,sssssss1-1)
else
sssssss1=ss4
strDBPath1=""
end if




'strDBPath1=路径
'filename=文件名
filename=sssssss1







set filea=new Cls_FSO





fpath=strDBPath1





if request("eemode")="1" then
cont=trim(request("Contentt"))
else
cont=trim(request("Content"))
end if



bname_err=0



if bname1="" then
bname_err=1

end if


Dim regEx
Set regEx = New RegExp ' 建立正则表达式。 
regEx.Pattern = "^[A-Za-z0-9_]+$" ' 设置模式。 
regEx.IgnoreCase = False ' 设置是否区分大小写。 
retVal = regEx.Test(bname1) ' 执行搜索测试。 







If retVal<>true and ztypee="" Then 


bname_err=1



End If 


if bname_err=1 then

%>



<script language=javascript>
alert("标签名为空 或者 不是字母+数字及_号的组合");

history.go(-1);


</script>


<%





response.end 




else









params_str=""

for iit=1 to cint(request("params_len"))

if trim(request("c"&cstr(iit)))<>"" then

sss1=replace(replace(trim(request("c"&cstr(iit))),",",""),"|","")
sss2=replace(replace(trim(request("s"&cstr(iit))),",", "," ),"|","")

params_str=params_str&sss1&","&sss2&"|"
end if

next
if params_str<>"" then
params_str=left(params_str,len(params_str)-1) 

end if

beizhuz=replace_asp(trim(request("lbsm")))



par=split(params_str,"|")



'----h2---------
yooo=0
yooo2=0
for iiii=0 to ubound(par)
sss33=split(par(iiii),",")
sss3=sss33(0)

for iiiii=0 to ubound(par)

sss44=split(par(iiiii),",")
sss4=sss44(0)

if sss3=sss4 and cint(iiiii)<>cint(iiii) then
yooo=1
yooo2=1
end if
next

next




errhhhtd=0

'----end h2---------



if yooo=1 then



'----h3---------
if yooo2=1 then
%>


<script language=javascript>

alert("发现参数列表中有同名参数,必须每个参数都不同名字!");

history.go(-1);
</script>


<%


response.end 

end if


if errhhhtd=1 then
%>



<script language=javascript>

alert("发现 本标签生成html静态页时的选项2 里填写的某个项的 开始asp代码的自定义开始标记 或 结束asp代码的自定义结束标记 里含以下的一个或多个不允许出现的字符:\n\n \" \' \, \: \| ");

history.go(-1);
</script>




<%


response.end 

end if
'----end h3---------





end if

















'asc(60)=<,asc(37)=%,chr(13)=enter,chr(62)=>


ext1=chr(60)&chr(37)&"'$start_ext_newDsoft 以下系统生成,勿删!"&vbcrlf&"'$newDsoft_label_type$:"&"asp_label"&"$end_newDsoft_label_type$"&vbcrlf

ext1=ext1&"'$newDsoft_label_name$:"&bname1&"$end_newDsoft_label_name$"&vbcrlf



ext1=ext1&"'$newDsoft_label_sql$:"&" "&"$end_newDsoft_label_sql$"&vbcrlf

ext1=ext1&"'$newDsoft_label_params$:"&params_str&"$end_newDsoft_label_params$"&vbcrlf


ext1=ext1&"'$newDsoft_label_fenye_num$:"&" "&"$end_newDsoft_label_fenye_num$"&vbcrlf

ext1=ext1&"'$newDsoft_label_beizhu$:"&beizhuz&"$end_newDsoft_label_beizhu$"&vbcrlf

ext1=ext1&"'$newDsoft_is_sys_label$:"&"0"&"$end_newDsoft_is_sys_label$"&vbcrlf


ext1=ext1&"'$newDsoft_other_params$:"&"htmledxa:"&htmledxa&"|htmledxb:"&htmledxb&"$end_newDsoft_other_params$"&vbcrlf

ext1=ext1&"'$end_ext_newDsoft"&chr(37)&chr(62)

















if yooo<>1 then

if savefile(ext1&huanyuan_textare_for_editor(cont),"../../Model/ComponentLabels/"&ss4)=true then





%>

<!--#include file=D_set_need_complied.asp-->


<%


'--------------------------add1

cont11=loadfile("../../Model/ComponentLabels/"&ss4)

call get_info_array_from_label_file_content(cont11)


if ztypee<>"" then
nd1_l_name=nd1_m_label_name&"$"&hzzza&"$"
end if



set rs4aa=server.CreateObject("adodb.recordset")
       
rs4aa.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,1




set rs4=server.CreateObject("adodb.recordset")
    
if not rs4aa.eof then
	   
rs4.open "select * from ND_label_cachem where lcase(label_name)='"&nd1_l_name&"'",conn2,1,3   
else
	   
rs4.open "select * from ND_label_cachem",conn2,1,3


rs4.addnew

end if


rs4("label_code")=huanyuan_textare_for_editor(nd1_label_code)
rs4("label_name")=nd1_l_name
rs4("label_full_path_name")=trim("Model/ComponentLabels/"&ss4)
rs4("label_params")=nd1_label_params
rs4("label_type")=nd1_label_type
rs4("label_sql")=nd1_label_sql
rs4("label_fenye_num")=nd1_label_fenye_num
rs4("label_beizhu")=nd1_label_beizhu
rs4("is_sys_label")="0"
rs4("label_other_params")=nd1_other_params


rs4.update

rs4.close

set rs4=nothing

'--------------------------add1




sssp=fpath
sssspq=split(sssp,"/")

ooosss=""

for iii=0 to ubound(sssspq)-2
ooosss=ooosss&sssspq(iii)&"/"
next





%>



<script language=javascript>

alert("修改成功!");

self.location="D_admin_custom_label.asp?fpath=<%=ooosss%>";


</script>


<%

end if
end if





end if


end if
%>

<%
AJAXcloseLoader()
%>

</html>